package com.lcxw.hxzbapi.service;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import com.lcxw.hxzbapi.dao.mapper.CubeMapper;
import com.lcxw.hxzbapi.entity.pojo.Cube;

@Component
public class CubeService {

    @Resource
    CubeMapper cubeMapper;

    public int deleteByPrimaryKey(int id)throws Exception {
      return cubeMapper.deleteByPrimaryKey(id);
    }

    public int insert(Cube cube)throws Exception{
        return cubeMapper.insert(cube);
    }

    public Cube selectByPrimaryKey(Integer id)throws Exception{
        return cubeMapper.selectByPrimaryKey(id);
    }

    public List<Cube> selectByType(String type){
        return cubeMapper.selectByType(type);
    }

    public List<Cube> selectAll(){
        return cubeMapper.selectAll();
    }

    public int updateByPrimaryKey(Cube cube)throws Exception{
        return cubeMapper.updateByPrimaryKey(cube);
    }
}
